package SpringCloudBase.config;

import com.netflix.client.config.IClientConfig;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/3/31 14:30
 */
@Configuration
@ExcluConfig //排除扫描
public class SpringCloudRibbonConfig {

    @Autowired
    IClientConfig clientConfig;


    @Bean
    public IRule robbonRule(IClientConfig config){//返回随机算法
        return new RandomRule();
    };
}
